<div class="content-form">
    <h2><?php echo $this->titulo; ?></h2>
    <div id="content-form">
        <form id="form_curso" action="" method="post" enctype="multipart/form-data">     
            <input type="hidden" id="CBS_ID" name="CBS_ID" value="<?php echo $this->data['CBS_ID']; ?>" />
                
            <div class="col">
                <div class="ln"><strong>Nome do Curso</strong> <input type="text" id="CBS_NOM" name="CBS_NOM" value="<?php echo $this->data['CBS_NOM']; ?>" required="" /></div>
                
                <div class="ln"><strong>Descrição</strong> <input type="text" id="CBS_DES" name="CBS_DES" value="<?php echo $this->data['CBS_DES']; ?>" /></div>   
                <div class="ln"><strong>Módulo</strong> <input type="text" id="CBS_MOD" name="CBS_MOD" value="<?php echo $this->data['CBS_MOD']; ?>" /></div>   
                <div class="ln"><strong>Objetivos</strong> 
                    <textarea id="CBS_OBJ" name="CBS_OBJ" style="width:345px !important"><?php echo $this->data['CBS_OBJ']; ?></textarea>
                </div> 
                <div class="ln"><strong>Estrutura</strong> 
                    <textarea id="CBS_EST" name="CBS_EST" style="width:345px !important"><?php echo $this->data['CBS_EST']; ?></textarea>
                </div>
            </div>
            
            <div class="col">
                
                <div class="ln"><strong>Período</strong> <br>
                    <?php
                        foreach(dominio::TipoSemestre() as $key => $nom){ 
                            $checked = $this->data['CBS_TPOTMP'] == $key ? 'checked=""':'';
                    ?>
                    <label><input type="radio" <?php echo $checked; ?> name="CBS_TPOTMP" id="CBS_TPOTMP" value="<?php echo $key; ?>" class="tpotmp"> <?php echo $nom; ?></label> &nbsp;     
                    <?php } ?>
                </div>
                <div class="ln"><strong>Imagem</strong> 
                    <?php
                    if($this->data['CBS_ID'] > 0){
                        $img = 'public/upload/curso/'.$this->data['CBS_ID'].'_tb.*';
                        foreach (glob($img) as $src) {
                            echo '<img src="'.$this->urlbase.'/'.$src.'" />';
                        }
                    }
                    ?>
                    <input type="file" id="CBS_FILE" name="CBS_FILE" />
                </div>
                
                <div class="ln"><strong>Ordem</strong> <input type="text" id="CBS_ORD" name="CBS_ORD" value="<?php echo $this->data['CBS_ORD']; ?>" class="number"/></div>
                
                <div class="ln"><strong>Status do Curso</strong> <br>
                    <label><input type="radio" name="CBS_STA" id="CBS_STA" value="1" class="tpotmp" <?php if($this->data['CBS_STA'] == '' || $this->data['CBS_STA'] == 1) echo 'checked=""'; ?>> Ativo</label> &nbsp;
                    <label><input type="radio" name="CBS_STA" id="CBS_STA" value="0" class="tpotmp" <?php if($this->data['CBS_STA'] == '0') echo 'checked=""'; ?> > Inativo</label>
                </div>
            
                <div>
                    <input type="submit" name="submit" id="submitbutton" value="Salvar" class="btn-frm">

                    <a href="<?php echo $this->urlmodulo.'/'.$this->controller; ?>" class="btn-frm">voltar</a>
                </div>
                
            </div>
        </form>
    </div>
</div>
<script>
dataPicker($('#CBS_DATINI'));
dataPicker($('#CBS_DATFIM'));
</script>